From: Bill Dally [billd@csl.stanford.edu]
Sent: Wednesday, October 10, 2001 10:52 PM
To: Ian Buck
Cc: lance@leland.Stanford.EDU; ujk@leland.Stanford.EDU; Billmark@lambert.stanford.edu; pmattson@leland.Stanford.EDU; serebrin@stanford.edu; merez@stanford.edu; jowens@graphics.stanford.edu; horowitz@chroma.stanford.edu; hanrahan@graphics.stanford.edu
Subject: Brook - multiple input and output streams
Ian,

Its not clear to me how you handle multiple input and output streams - especially when they are different rates.

For example, how would you handle the case where you have two input streams, a and b, and you want to take the next element of a, add it to the next two elements of b append the result to c if its positive and to d if its negative?  This may sound contrived, but there actually is Imagine code that does things like this.

The conditional and unconditional << and >> operators in KernelC are pretty useful.  You should consider adopting this model in Brook - where the kernel is 'active' for the duration of the stream - rather than a single element - and can explicitly read from inputs and write to outputs.

----Bill

P.S.  You should include Peter Mattson on your distribution of the Brook language spec.  Peter is largely responsible for the present form of StreamC/KernelC.

P.P.S.  In your example in Figure 4 you write tvtx.v = matrix * vtx.v  What does this mean?  Vertex doesn't have a .v field and what does it mean to assign to just one field of an output record?

--------------------------------------------------------------------------
Bill Dally                billd@csl.stanford.edu             (650)725-8945
Professor of Electrical Engineering and Computer Science  FAX(650)725-6949
Computer Systems Laboratory, Stanford University
Gates Room 301
Stanford, CA  94305                         http://csl.stanford.edu/~billd
--------------------------------------------------------------------------